package com.phcx.corporate.utils;

import com.phcx.corporate.model.AdminInfo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/*
 * @Author: zmh
 * @Date: 2023/05/31/9:44
 * @Description:
 */
public class SessionUtil {


    public static AdminInfo sessionExpiration(HttpServletRequest request) {
        HttpSession session = request.getSession(false);
        if (session != null) {
            return (AdminInfo) request.getSession().getAttribute("admin");
        }
        return null;
    }


}
